package vn.smartoffice.promail.controller;

import lombok.Getter;
import lombok.Setter;

import org.zkoss.bind.annotation.BindingParam;
import org.zkoss.bind.annotation.GlobalCommand;
import org.zkoss.bind.annotation.NotifyChange;
import org.zkoss.zk.ui.select.annotation.VariableResolver;
import org.zkoss.zkplus.spring.DelegatingVariableResolver;

import vn.smartoffice.promail.entity.MailItem;

@VariableResolver(DelegatingVariableResolver.class)
public class PreviewPanelCtr {

	@Getter @Setter private MailItem mailItem;

	@GlobalCommand
	@NotifyChange("mailItem")
	public void showMailContent(@BindingParam("selectedItem") MailItem selectedItem) {
		this.mailItem = selectedItem;
	}
}
